// TOWN DIALOGUE SCRIPT
//    Town 16: Dargoth (after winning)

// This is the dialogue for this town.
// You can use states numbered from 1 to 99.

begintalkscript;

variables;

short choice;

// *** Temple Guards ***
begintalknode 1;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Temple Guard";
	text1 = "The guard looks in your direction.";
	text2 = "_Please move along now._ the guard says.";
	text3 = "_Enjoy your stay and don't cause problems._ the guard says.";
	text4 = "The guard appears to be giving you the ol' evil eye.";
	text5 = "_Welcome to Dargoth visitor._ the guard says.";
	text6 = "The guard sizes you up, then looks away after determining you aren't a threat.";
	text7 = "_Stay out of trouble._ the guard says.";
	text8 = "_Make sure to visit the temple._ the guard says.";
	action = END_TALK;
	code =
		clear_strings();
		add_string(1);
		add_string(get_ran(1, 2, 8));
	break;

// *** Monks (male) ***
begintalknode 2;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Monk";
	text1 = "The monk ignores you since he has taken a vow of silence.";
	action = END_TALK;

// *** Monks (female) ***
begintalknode 3;
	state = -1;
	personality = -1;
	nextstate = -1;
	condition = 1;
	question = "Monk";
	text1 = "The monk ignores you since she has taken a vow of silence.";
	action = END_TALK;

// *** The Bishop ***
begintalknode 6;
	state = -1;
	personality = 1606;
	nextstate = 7;
	condition = 1;
	question = "The Bishop";
	text1 = "A priest is busy within the temple proper.";
	text2 = "_I am The Bishop in the Temple of Narn._ he says as you get closer.";
	text3 = "_Can I help you with something?_ he asks.";
	text5 = "The Bishop pauses what he is working on as you approach.";
	text6 = "_Do you need my aid?_ he asks.";
	action = INTRO;

begintalknode 7;
	state = 7;
	personality = 1606;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "_I give guidance and aid to the monks and guards of the Temple of Narn._ The Bishop replies.";
	text2 = "_I also aid those that need help or identify unknown items._";
	text3 = "_For a suitable donation, though not as much for heroes._ The Bishop adds.";
	text3 = "The Bishop points to a donation bowl by the alter.";

begintalknode 8;
	state = 7;
	personality = 1606;
	nextstate = -1;
	condition = 1;
	question = "Can I get some aid (25 coins)?";
	text1 = "The Bishop replies _The Temple requires at least a 25 coin donation first._";
	text3 = "The Bishop says _Return when you need aid._";
	text5 = "The Bishop kneels and prays for the injured.  In a flash, you feel your energy and strength returning.";
	code =
		clear_strings();
		if (coins_amount() < 25) 
			add_string(1);
		else if (run_select_a_pc(1) == FALSE)
			add_string(3);
		else {
			play_sound(24);
			add_string(5);
			restore_pc(get_selected_pc());
			change_coins(-25);
		}
	break;

begintalknode 9;
	state = 7;
	personality = 1606;
	nextstate = -1;
	condition = 1;
	question = "Can you identify some items for me (2 coins each)?";
	text1 = "The Bishop inspects your equipment while whispering under his breath to himself.";
	action = ID 2;

begintalknode 10;
	state = 7;
	personality = 1606;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "The Bishop returns to his task he was working on.";
	text2 = "_Stay safe and return if you need my aid._ The Bishop says.";
	action = END_TALK;

// *** James (inn) ***
begintalknode 16;
	state = -1;
	personality = 1614;
	nextstate = 17;
	condition = 1;
	question = "James";
	text1 = "A man is waiting on patrons from behind the counter.";
	text2 = "He smiles at you at your approach _Hi all, I'm James._";
	text3 = "_Can I get you something?_ he asks.";
	text5 = "James turns to wait on you.";
	text6 = "_Whatcha need?_ he asks.";
	action = INTRO;
	code =
		set_flag(16, 5, FALSE);
	break;

begintalknode 17;
	state = 17;
	personality = 1614;
	nextstate = -1;
	condition = 1;
	question = "What can you offer?";
	text1 = "James replies _I provide food, drink and a place to rest._";
	text2 = "_Just let me know if I can get something for you._";

begintalknode 18;
	state = 17;
	personality = 1614;
	nextstate = -1;
	condition = 1;
	question = "Can I see your food menu?";
	text1 = "You finish ordering food from James.";
	code =
		begin_shop_mode("Rosewood Inn", "James provides a slew of tasty food for the hungry adventurer.  The prices are not bad.", 1, 2, -1);
	break;

begintalknode 19;
	state = 17;
	personality = 1614;
	nextstate = 22;
	condition = 1;
	question = "I'd like a drink please.";
	text1 = "_A mug of ale is 3 coins, Ok?_ asks James.";
	text2 = "He awaits your reply.";
	code =
		set_flag(16, 5, TRUE);
	break;

begintalknode 20;
	state = 17;
	personality = 1614;
	nextstate = -1;
	condition = (has_special_item(8) == 0);
	question = "Can I get a room (25 coins)?";
	text1 = "_Rooms are 25 coins and you don't have enough._ James says.";
	text3 = "James gives you a key _Both are open right now, take your pick._";
	code =
		clear_strings();
		if (coins_amount() < 25) 
			add_string(1);
		else {
			add_string(3);
			change_spec_item(8, 1);
			change_coins(-25);
			set_flag(16, 6, TRUE);
		}
	break;

begintalknode 21;
	state = 17;
	personality = 1614;
	nextstate = -1;
	condition = 1;
	question = "I don't need anything now, thanks.";
	text1 = "James says _Ok, I'm here if you need something I have._";
	text2 = "He turns to the next patron to see if they want anything.";
	action = END_TALK;

begintalknode 22;
	state = 22;
	personality = 1614;
	nextstate = -1;
	condition = (get_flag(16, 5) > 0);
	question = "No thanks, not right now.";
	text1 = "James picks up a glass and starts polishing it.";
	text2 = "_Let me know if you'd like something later_ he says.";
	code =
		set_flag(16, 5, FALSE);
	break;

begintalknode 23;
	state = 22;
	personality = 1614;
	nextstate = -1;
	condition = (get_flag(16, 5) > 0);
	question = "Yes please, I'm thirsty.";
	text1 = "James serves you a big frosty mug of ale.";
	text3 = "_You don't have enough coins.  Come back when you do_ James adds.";
	text5 = "James smiles and says _Let me know if you want one later._";
	text7 = "James says _You are too drunk for me to serve.  Go sleep it off first._";
	code =
		set_flag(16, 5, FALSE);
		clear_strings();
		if (coins_amount() < 3)
			add_string(3);
		else if (run_select_a_pc(1) == 0)
			add_string(5);
		else {
			if (get_char_status(get_selected_pc(), 28) >= 20) {
				add_string(7);
			}
			else {
				play_sound(24);
				add_string(1);
				change_coins(-3);
				// make drunk
				set_char_status(get_selected_pc(), 28, 10, TRUE, FALSE);
			}
		}
	break;

// *** James (souvenir) ***
begintalknode 26;
	state = -1;
	personality = 1621;
	nextstate = 27;
	condition = 1;
	question = "James";
	text1 = "A man is waiting on patrons from behind the counter.";
	text2 = "He smiles at you at your approach _Hi all, I'm James._";
	text3 = "_Can I get you something?_ he asks.";
	text5 = "James turns to wait on you.";
	text6 = "_Whatcha need?_ he asks.";
	action = INTRO;

begintalknode 27;
	state = 27;
	personality = 1621;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "James says _I run the souvenir shop for the Staff of Turin house._";
	text2 = "_The staff is stored in the house right next door._ he adds pointing to the east.";
	text3 = "_Can I show you some of our fine gifts?_ he asks.";

begintalknode 28;
	state = 27;
	personality = 1621;
	nextstate = -1;
	condition = 1;
	question = "Let me see the souvenirs.";
	text1 = "You finish looking over the souvenirs.";
	code =
		begin_shop_mode("Souvenirs", "James has a bunch of souvenirs available for the hapless tourist.  Prices aren't bad.", 0, 2, -1);
	break;

begintalknode 29;
	state = 27;
	personality = 1621;
	nextstate = -1;
	condition = 1;
	question = "Are there many tourists through here?";
	text1 = "James smiles a little and replies _It's picking up, some here and there, much like yourselves._";
	text2 = "_The Wilderness is getting back to what it was with the protection of the Staff._ he explains.";
	text3 = "_Now that we have the staff back, things will definitely pick up._ he adds.";

begintalknode 30;
	state = 27;
	personality = 1621;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "James smiles and waves _See ya later._";
	text2 = "_Come back if you need something to remember your trip with._";
	action = END_TALK;

// *** Jamie (souvenir) ***
begintalknode 36;
	state = -1;
	personality = 1622;
	nextstate = 37;
	condition = 1;
	question = "Jamie";
	text1 = "A woman is busy restocking shelves and racks with knickknacks.";
	text2 = "She stops as you approach and says _Hello, I'm Jamie._";
	text3 = "_If you want to buy something, you'll need to talk to my husband._ she adds.";
	text5 = "Jamie stops what she is doing.";
	text6 = "_Hello again._ she says.";
	action = INTRO;

begintalknode 37;
	state = 37;
	personality = 1622;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "Jamie replies _I help out my husband with the souvenir shop._";
	text2 = "_Mainly restock items and keep things clean._ she adds.";
	text3 = "_If you'd like to buy something, you'll need to talk to my husband James._";

begintalknode 38;
	state = 37;
	personality = 1622;
	nextstate = -1;
	condition = 1;
	question = "Why are there a lot of James?";
	text1 = "Jamie says _Because James was the one who warned us about Lagoth Zanta and his dastardly deed._";
	text2 = "Jamie looks serious _Without his warning, the salvation we have would not have come to be._.";
	text3 = "She continues _Because of that, males born in Dargoth are all happy to carry his name._";

begintalknode 39;
	state = 37;
	personality = 1622;
	nextstate = -1;
	condition = 1;
	question = "Goodbye.";
	text1 = "_Don't forget to buy something to remember your visit with._ Jamie says.";
	action = END_TALK;

// *** Jamie (house) ***
begintalknode 56;
	state = -1;
	personality = 1624;
	nextstate = 57;
	condition = 1;
	question = "Jamie";
	text1 = "A woman is busy with cooking in the house.  She seems a little startled that you're in there.";
	text2 = "She composes herself and says _Who are you and what do you want?_";
	text3 = "Her natural courtesy comes through and she adds _I'm Jamie by the way._";
	text4 = "_Though I'd prefer if you knocked before entering._ she says.";
	text5 = "_Back in again?_ Jamie asks.";
	text6 = "_Still haven't learned to knock yet I see._ she says.";
	action = INTRO;

begintalknode 57;
	state = 57;
	personality = 1624;
	nextstate = -1;
	condition = 1;
	question = "What do you do?";
	text1 = "_When people aren't barging in and bothering me_ she says pointedly _I help out over at the Bishop's place._";
	text2 = "_I used to help my husband James at what was the museum, before the staff was returned._";
	text3 = "_Now that it is back, he is the watcher and doesn't need as much help._";
	text4 = "_Are you done bothering me, I got food to finish for both my husband and the Bishop?_";
	text5 = "Jamie looks at the door after finishing that statement.";

begintalknode 58;
	state = 57;
	personality = 1624;
	nextstate = -1;
	condition = 1;
	question = "Sorry to bother you, bye.";
	text1 = "Jamie softens some _No problem this time, knock next time._ she says.";
	text2 = "_Goodbye._";
	action = END_TALK;
